package com.controller.page.pageajax;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.common.ajax.AjaxRes;
import com.common.mybatis.Page;
import com.entity.XinWenZiXun;
import com.service.XinWenLanMuService;
import com.service.XinWenZiXunService;

@Controller
@RequestMapping("/page")
public class PageAjaxController {
	@Autowired
	private XinWenLanMuService xwlmService;
	@Autowired
	private XinWenZiXunService xwzxService;
	
	@RequestMapping("/findPages")
	@ResponseBody
	public AjaxRes findPages(XinWenZiXun o,Page<XinWenZiXun> page){
		AjaxRes res = new AjaxRes();
		System.out.println("------------"+o);
		Page<XinWenZiXun> pages = xwzxService.findByPage(o,page);
		System.out.println("------------"+pages);
		res.setSucceed(pages,"数据加载成功");
		return res;
	}
}
